import time

import robomaster.robot

from flying import Flying


robomaster.config.LOCAL_IP_STR = "192.168.10.2"
tl_drone = robomaster.robot.Drone()
tl_drone.initialize()
flying = Flying(tl_drone)
flying.takeof_udp()
x = 0
# flying.rc_udp(b=20)
# time.sleep(5)
# flying.stop_udp()
# print("6")
# flying.rc_udp(a=20)
# print("7")
# time.sleep(3)
# print("8")
# flying.stop_udp()

while True:
    flying.rotate_udp(90)
    flying.go_udp(80,0,0,20)
    x = x + 80
    print(x)

